package com.mac.hosp_pre.admin.mq;

import com.mac.hosp_pre.mq.MqConst;
import com.mac.hosp_pre.mq.OrderMqDto;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;


@Slf4j
@Component
@RocketMQMessageListener(topic = MqConst.ORDER_TOPIC,consumerGroup = MqConst.ORDER_GROUP,
        maxReconsumeTimes = 2, selectorExpression = MqConst.ORDER_TAG_MASTER)
public class OrderListener implements RocketMQListener<OrderMqDto> {


    @Override
    public void onMessage(OrderMqDto orderMqDto) {
        //下单成功更新预约数
        log.info("下单成功更新预约请求参数:{}", orderMqDto);
    }
}
